package com.tbit.manager.api.dto;

import com.alibaba.fastjson.annotation.JSONField;
import com.tbit.common.group.DefaultGroupA;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.Future;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 会员卡
 *
 * @since 2024/11/28
 */
@Data
public class PackageDelayDTO {
    /**
     * 优惠券:couponUserId
     * 骑行卡/会员卡  orderNO
     */
    @NotBlank(message = "请选择需要延长的选项", groups = {DefaultGroupA.class})
    private String busId;
    /**
     * 用户id
     */
    @NotNull(message = "请选择用户", groups = {DefaultGroupA.class})
    private Integer userId;
    /**
     * 到期时间
     */
    @NotNull(message = "请选择到期时间", groups = {DefaultGroupA.class})
    @Future(message = "时间不能小于今天")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date delayTime;
    /**
     * 操作密钥
     */
    private String pwd;

}
